package com.microservices.cloud.service;


import com.microservices.cloud.config.FeignConfig;
import com.microservices.cloud.entities.CommonResult;
import com.microservices.cloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",configuration = FeignConfig.class)
public interface PaymentFeignService {

    @GetMapping(value = "/pay/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);


    @GetMapping(value = "/pay/payment/feign/timeout")
    String feignTimeOut();

}
